package com.myFwk.feign;

import com.myFwk.model.JwtToken;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author GL
 * @version 1.0
 * @date 2021/9/1 21:30
 */
@FeignClient(value = "authorization-server")
public interface OAuth2FeignClient {


    @PostMapping("/oauth/token")
    ResponseEntity<JwtToken> getToken(@RequestParam("grant_type") String grantType,
                                      @RequestParam("username") String username,
                                      @RequestParam("password") String password,
                                      @RequestParam("login_type") String loginType);  //base Token

}
